import { developmentUrl } from "../config/env";
import request from "../config/axios";
//banner管理 /banner/list
export const bannerlist = (data) => request({
    url: `${developmentUrl}/banner/list?title=${data.title}`,
    method: "GET",
    data
})
// 上传图片 file
export const file = () => request({
    url: `${developmentUrl}/file`,
    method: "POST",
    
})
//添加 /banner?id=&title=123123&page=index&param=%7B%22id%22:%221%22%7D&idFile=d1048c6b-f3b2-495c-bd75-dc3675238d1e.jpg&type=index
export const banner = (data) => request({
    url: `http://localhost:9528/dev-api/banner?id=${data.id}&title=${data.title}&page=${data.page}&param=${data.param}&idFile=${data.idFile}&type=${data.type}`,
    method: "POST",
    data
})

//删除  banner?id=26
export const bannerDelete = (data) => request({
    url: `${developmentUrl}/banner?id=${data.id}`,
    method: "DELETE",
    
})